using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;

public class UIRemainingTime : MonoBehaviour
{
	public GameObject content;

	public Text remainingTimeText;

	private void Awake()
	{
		remainingTimeText.text = string.Empty;
	}

	public void ShowRemainingTime(int seconds)
	{
		base.gameObject.SetActive(value: true);
		content.transform.localScale = Vector3.zero;
		content.transform.DOScale(1f, 0.2f).SetEase(Ease.OutBack);
		remainingTimeText.text = string.Format("{0}{1}", seconds, LocalizationManager.GetTranslation("TXT_GAME_SECOND"));
		Invoke("Hide", 3f);
	}

	private void Hide()
	{
		content.transform.DOScale(0f, 0.2f).OnComplete(delegate
		{
			content.SetActive(value: false);
		});
	}
}
